package com.atstudying.mall.mallauthserver.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author Mr.zhneg
 * @create 2020-11-11-19:47
 */
@Configuration
public class MallWebConfig implements WebMvcConfigurer{

    /**
     * 视图映射器
     * @param registry
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {


        //Set the view name to return.：setViewName
        //Map a view controller to the given URL path (or pattern) in order to render
        //	 * a response with a pre-configured status code and view.：addViewController
//        registry.addViewController("/login.html").setViewName("login");
        registry.addViewController("/reg.html").setViewName("reg");


    }

}
